package com.xgd.phylw.service.impl;

import com.xgd.phylw.bean.Hall;
import com.xgd.phylw.bean.Member;
import com.xgd.phylw.bean.Movie;
import com.xgd.phylw.bean.Orderd;
import com.xgd.phylw.mapper.HallMapper;
import com.xgd.phylw.mapper.MemberMapper;
import com.xgd.phylw.mapper.MovieMapper;
import com.xgd.phylw.mapper.OrderdMapper;
import com.xgd.phylw.service.AdminCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminCountServiceImpl implements AdminCountService {
    @Autowired
    private MemberMapper memberMapper;
    @Autowired
    private HallMapper hallMapper;
    @Autowired
    private MovieMapper movieMapper;
    @Autowired
    private OrderdMapper orderdMapper;

    public List<Member> membarBymemberTemp() {
        return memberMapper.countByMember();
    }

    public List<Orderd> zhexiantu() {
        return orderdMapper.countByOrder();
    }

    public long orderAll() {
        return orderdMapper.countBy();
    }

    public Movie movieCount() {
        return movieMapper.countByMovie();
    }

    public List<Movie> MovieTempTop() {
        return movieMapper.selectAllMovieAndTemp(new Movie());
    }

    public Hall hallCount() {
        return hallMapper.countByHall();
    }
}
